package com.xhwl.data.util;

public class Constant {

    public static final Integer PWD_EDIT_ERROR_LIMIT_NUMBER_TIMES = 5;
    public static final Integer PWD_EDIT_ERROR_LOCKING_NUMBER_TIMES = 10;
    public static final String PWD_EDIT_ERROR_LOCKING = "PWD_EDIT_ERROR_LOCKING_";

    public static final String PWD_EDIT_ERROR_COUNT = "PWD_EDIT_ERROR_COUNT_";
    public static final String LOGIN_TAG = "LOGIN_TAG_";
    public static final String OWNER_APP = "OWNER_APP";
    public static final String SCH_MSG_CODE = "sch_msg_template";
    public static final String RSD_MSG_CODE = "rsd_msg_template";
    public static final String BUZ_MSG_CODE = "buz_msg_template";

    public static final String MSG_CODE_ERROR_COUNT = "MSG_CODE_ERROR_COUNT_";
    public static final Integer MSG_CODE_LENGTH = 6;
    public static final String MSG_CODE_PREFIX = "MSG_CODE_";
    public static final String MSG_CODE_SEND_LIMIT = "MSG_CODE_SEND_LIMIT_";
    public static final Integer MSG_CODE_SEND_LIMIT_NUMBER_TIMES = 1;
    public static final String MSG_CODE_SEND_LOCKING = "MSG_CODE_SEND_LOCKING_";
    public static final Integer MSG_CODE_SEND_LOCKING_NUMBER_TIMES = 5;
    public static final Integer MSG_CODE_VALID_MIN = 5;

    public static final String ADMIN_APPID = "202012159464";

    public static final String ADMIN_TOKEN_PREFIX = "TOKEN_ADMIN_";

    public static final String TOKEN_PREFIX = "TOKEN_";

    public static final String PERMISSION_PREFIX = "PERMISSION_";

    public static final String ACCOUNT_INFO_PREFIX = "USERINFO_";

    public static final String APPID_PREFIX = "APPID_";

    public static String getAppId(String id) {
        return APPID_PREFIX + id;
    }

    public static String getAdminTokenKey(String id) {
        return ADMIN_TOKEN_PREFIX + id;
    }

    public static String getTokenKey(String appId, String id) {
        return appId + "_" + TOKEN_PREFIX + id;
    }

    public static String getLoginTagKey(Integer appType, String id) {
        return appType + "_" + LOGIN_TAG + id;
    }


    public static String getPermissionKey(String appId, String id) {
        return appId + "_" + PERMISSION_PREFIX + id;
    }

    public static String getAccountInfoKey(String appId, String id) {
        return appId + "_" + ACCOUNT_INFO_PREFIX + id;
    }
}